import Vue from 'vue'
import App from './App.vue'
import router from '@/router'
import store from "./store"
import TypeNav from "@/components/TypeNav"
import "@/mockServer"
import "swiper/css/swiper.min.css"
import pagination from "@/components/Pagination"
import Dialog from "@/components/Dialog"
Vue.config.productionTip = false
//全局注册组件
Vue.component(TypeNav.name,TypeNav)
Vue.component(pagination.name,pagination)
Vue.component(Dialog.name,Dialog);
//按需引入
import { Message } from 'element-ui'
Vue.prototype.$message=Message//将message的方法绑定在实例上
import VueLazyload from 'vue-lazyload'
import load from '@/assets/0.gif'
Vue.use(VueLazyload, {
  // loading: 'dist/loading.gif',
  loading: load,
})
new Vue({
  render: h => h(App),
  router,
  store,
  beforeCreate(){
    Vue.prototype.$bus=this


  }
  //安装中央事件总线

}).$mount('#app')